source ~/.bashrc
dir=/home/work_nfs15/xlgeng/new_workspace/wenet_gxl_salmonn/examples/aishell/salmonn/exp/salmonn_v14/1_epoch
mkdir -p $dir
train_config=conf/train_salmonn_v14.yaml
test_data_dir="/home/work_nfs15/xlgeng/data/scp_test"

pt_name="step_15708"
scene_name="speechio"



decode_checkpoint=$dir/"${pt_name}".pt
stage=5
stop_stage=5

echo "final checkpoint is $decode_checkpoint"


full_speechio="speechio_0 speechio_1 speechio_2 speechio_3 speechio_4 speechio_5 speechio_6 speechio_7 speechio_8 speechio_9 speechio_10 speechio_11 speechio_12 speechio_13 speechio_14 speechio_15 speechio_16 speechio_17 speechio_18 speechio_19 speechio_20 speechio_21 speechio_22 speechio_23 speechio_24 speechio_24 speechio_25 speechio_26"
half_1="speechio_0 speechio_1 speechio_2 speechio_3 speechio_4 speechio_5 speechio_6 speechio_7 speechio_8 speechio_9 speechio_10 speechio_11 speechio_12 speechio_13"
half_2="speechio_14 speechio_15 speechio_16 speechio_17 speechio_18 speechio_19 speechio_20 speechio_21 speechio_22 speechio_23 speechio_24 speechio_24 speechio_25 speechio_26"


 gpu_id=1
 task_name="short_prompt"
 prompt_map_file='./infer_given_prompt/speechio_short_prompt.scp'
 res_path=$pt_name/$scene_name/$task_name
 log_name="$pt_name"_"$scene_name"_"$task_name"
 test_sets=$full_speechio
 test_sets=$(echo "$test_sets" | sed 's/ /--/g') # 为了传输给recognize.sh
 my_named_nohup "$log_name"_"$gpu_id" ./recognize.sh --gpu_id $gpu_id --dir $dir --train_config "$train_config" --decode_checkpoint "$decode_checkpoint" --decode_checkpoint_name "$res_path" --stage $stage --stop_stage $stop_stage --test_data_dir "$test_data_dir"  --test_sets "$test_sets" --prompt_map_file "$prompt_map_file"

gpu_id=2
task_name="long_prompt"
prompt_map_file='./infer_given_prompt/speechio_long_prompt.scp'
res_path=$pt_name/$scene_name/$task_name
log_name="$pt_name"_"$scene_name"_"$task_name"
test_sets=$full_speechio
test_sets=$(echo "$test_sets" | sed 's/ /--/g') # 为了传输给recognize.sh
my_named_nohup "$log_name"_"$gpu_id" ./recognize.sh --gpu_id $gpu_id --dir $dir --train_config "$train_config" --decode_checkpoint "$decode_checkpoint" --decode_checkpoint_name "$res_path" --stage $stage --stop_stage $stop_stage --test_data_dir "$test_data_dir"  --test_sets "$test_sets" --prompt_map_file "$prompt_map_file"


echo "finish!"